package com.yytek.nmp.api.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yytek.common.core.annotation.Excel;
import com.yytek.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 设备管理对象 iot_device_info
 * 
 * @author yytek-iot
 * @date 2022-07-05
 */
@ApiModel("设备管理对象")
public class IotDeviceInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 设备id */
    @ApiModelProperty("设备id")
    private String iotId;

    /** 所属产品ID */
    @Excel(name = "所属产品ID")
    @ApiModelProperty("所属产品ID")
    private Long productId;

    /** 所属产品名称 */
    @Excel(name = "所属产品名称")
    @ApiModelProperty("所属产品名称")
    private String productName;

    /** 设备名称 */
    @Excel(name = "设备名称")
    @ApiModelProperty("设备名称")
    private String deviceName;

    /** 设备状态(0-禁用 1-启用) */
    @Excel(name = "设备状态(0-禁用 1-启用)")
    @ApiModelProperty("设备状态(0-禁用 1-启用)")
    private Integer deviceStatus;

    /** 连接状态(1-未激活 2-在线 3-离线) */
    @Excel(name = "连接状态(1-未激活 2-在线 3-离线)")
    @ApiModelProperty("连接状态(1-未激活 2-在线 3-离线)")
    private Integer connectStatus;

    /** 节点类型(1-网关设备 2-网关子设备 3-直连设备) */
    @Excel(name = "节点类型(1-网关设备 2-网关子设备 3-直连设备)")
    @ApiModelProperty("节点类型(1-网关设备 2-网关子设备 3-直连设备)")
    private Integer nodeType;

    /** 协议类型 */
    @Excel(name = "协议类型")
    @ApiModelProperty("协议类型")
    private String protocol;

    /** 分组id */
    @Excel(name = "分组id")
    @ApiModelProperty("分组id")
    private Long groupId;

    /** 项目id */
    @Excel(name = "项目id")
    @ApiModelProperty("项目id")
    private Long projectId;

    /** 设备连接ip和端口 */
    @Excel(name = "设备连接ip和端口")
    @ApiModelProperty("设备连接ip和端口")
    private String ip;

    /** 最后一次上线时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后一次上线时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("最后一次上线时间")
    private Date lastTime;

    /** 激活时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "激活时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("激活时间")
    private Date activeTime;

    /** 密码 */
    @Excel(name = "密码")
    @ApiModelProperty("密码")
    private String password;

    /** 加盐 */
    @Excel(name = "加盐")
    @ApiModelProperty("加盐")
    private String salt;

    /** 连接设备的密钥 */
    @Excel(name = "连接设备的密钥")
    @ApiModelProperty("连接设备的密钥")
    private String secKey;

    public void setIotId(String iotId) 
    {
        this.iotId = iotId;
    }

    public String getIotId() 
    {
        return iotId;
    }
    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }
    public void setProductName(String productName) 
    {
        this.productName = productName;
    }

    public String getProductName() 
    {
        return productName;
    }
    public void setDeviceName(String deviceName) 
    {
        this.deviceName = deviceName;
    }

    public String getDeviceName() 
    {
        return deviceName;
    }
    public void setDeviceStatus(Integer deviceStatus) 
    {
        this.deviceStatus = deviceStatus;
    }

    public Integer getDeviceStatus() 
    {
        return deviceStatus;
    }
    public void setConnectStatus(Integer connectStatus) 
    {
        this.connectStatus = connectStatus;
    }

    public Integer getConnectStatus() 
    {
        return connectStatus;
    }
    public void setNodeType(Integer nodeType) 
    {
        this.nodeType = nodeType;
    }

    public Integer getNodeType() 
    {
        return nodeType;
    }
    public void setProtocol(String protocol) 
    {
        this.protocol = protocol;
    }

    public String getProtocol() 
    {
        return protocol;
    }
    public void setGroupId(Long groupId) 
    {
        this.groupId = groupId;
    }

    public Long getGroupId() 
    {
        return groupId;
    }
    public void setProjectId(Long projectId) 
    {
        this.projectId = projectId;
    }

    public Long getProjectId() 
    {
        return projectId;
    }
    public void setIp(String ip) 
    {
        this.ip = ip;
    }

    public String getIp() 
    {
        return ip;
    }
    public void setLastTime(Date lastTime) 
    {
        this.lastTime = lastTime;
    }

    public Date getLastTime() 
    {
        return lastTime;
    }
    public void setActiveTime(Date activeTime) 
    {
        this.activeTime = activeTime;
    }

    public Date getActiveTime() 
    {
        return activeTime;
    }
    public void setPassword(String password) 
    {
        this.password = password;
    }

    public String getPassword() 
    {
        return password;
    }
    public void setSalt(String salt) 
    {
        this.salt = salt;
    }

    public String getSalt() 
    {
        return salt;
    }
    public void setSecKey(String secKey) 
    {
        this.secKey = secKey;
    }

    public String getSecKey() 
    {
        return secKey;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("iotId", getIotId())
            .append("productId", getProductId())
            .append("productName", getProductName())
            .append("deviceName", getDeviceName())
            .append("deviceStatus", getDeviceStatus())
            .append("connectStatus", getConnectStatus())
            .append("nodeType", getNodeType())
            .append("protocol", getProtocol())
            .append("groupId", getGroupId())
            .append("projectId", getProjectId())
            .append("ip", getIp())
            .append("lastTime", getLastTime())
            .append("activeTime", getActiveTime())
            .append("password", getPassword())
            .append("salt", getSalt())
            .append("secKey", getSecKey())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
